import javax.swing.*;
import java.util.Random;
import java.util.Scanner;
public class Test {
    public static void main(String[] args) {
        //int num=add(10,20);//函数调用
        //System.out.println(num);
        boolean flg =isleapyYear (2008);
        System.out.println(flg);
    }

    public static boolean isleapyYear(int year){
        if(year%4==0 && year%100 !=0 || year % 400==0) {
            System.out.println(year + "是闰年");
            return true;
        }else{
            System.out.println(year+"不是闰年");
            return false;
        }
    }
    public static int add(int a, int b){//函数定义
        return a+b;
    }
    //猜数字游戏
    public static void main4(String[] args) {
        int count =5;
        Scanner scanner = new Scanner(System.in);
        Random random = new Random();
        int ranNum = random.nextInt(100);//[0,100);
        while (count!=0){
            System.out.println("请输入数字： ");
            int num = scanner.nextInt();
            if(ranNum < num ) {
                System.out.println("太大了！");
            }else if(ranNum > num ) {
                System.out.println("太小了！");
            }else{
                        System.out.println("猜对了");
                        break;
                    }
            count--;
            System.out.println("你还有"+count+"机会");
                }
        scanner.close();
            }

        }



   /* public static void main3(String[] args) {
        Random random = new Random();
        int num = random.nextInt(100);
        System.out.println(num);
    }
    public static void main2(String[] args) {
        Scanner scan = new Scanner(System.in);
        String a = scan.nextLine();
        System.out.println(a);
        scan.close();
    }
    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        System.out.println(n);
        scanner.close();
    }
*/
